\(\int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx\) [271]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 17, antiderivative size = 32 \[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=-\frac {\arctan \left (\sqrt {\csc (a+b x)}\right )}{b}+\frac {\text {arctanh}\left (\sqrt {\csc (a+b x)}\right )}{b} \]

[Out]

-arctan(csc(b*x+a)^(1/2))/b+arctanh(csc(b*x+a)^(1/2))/b

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {2701, 335, 304, 209, 212} \[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=\frac {\text {arctanh}\left (\sqrt {\csc (a+b x)}\right )}{b}-\frac {\arctan \left (\sqrt {\csc (a+b x)}\right )}{b} \]

[In]

Int[Sqrt[Csc[a + b*x]]*Sec[a + b*x],x]

[Out]

-(ArcTan[Sqrt[Csc[a + b*x]]]/b) + ArcTanh[Sqrt[Csc[a + b*x]]]/b

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 335

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/c^n))^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2701

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\sqrt {x}}{-1+x^2} \, dx,x,\csc (a+b x)\right )}{b} \\ & = -\frac {2 \text {Subst}\left (\int \frac {x^2}{-1+x^4} \, dx,x,\sqrt {\csc (a+b x)}\right )}{b} \\ & = \frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\csc (a+b x)}\right )}{b}-\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\csc (a+b x)}\right )}{b} \\ & = -\frac {\arctan \left (\sqrt {\csc (a+b x)}\right )}{b}+\frac {\text {arctanh}\left (\sqrt {\csc (a+b x)}\right )}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.47 \[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=\frac {\left (\arctan \left (\sqrt {\sin (a+b x)}\right )+\text {arctanh}\left (\sqrt {\sin (a+b x)}\right )\right ) \sqrt {\csc (a+b x)} \sqrt {\sin (a+b x)}}{b} \]

[In]

Integrate[Sqrt[Csc[a + b*x]]*Sec[a + b*x],x]

[Out]

((ArcTan[Sqrt[Sin[a + b*x]]] + ArcTanh[Sqrt[Sin[a + b*x]]])*Sqrt[Csc[a + b*x]]*Sqrt[Sin[a + b*x]])/b

Maple [A] (verified)

Time = 0.93 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.75

method result size
default \(\frac {\operatorname {arctanh}\left (\sqrt {\sin }\left (b x +a \right )\right )+\arctan \left (\sqrt {\sin }\left (b x +a \right )\right )}{b}\) \(24\)

[In]

int(csc(b*x+a)^(1/2)*sec(b*x+a),x,method=_RETURNVERBOSE)

[Out]

(arctanh(sin(b*x+a)^(1/2))+arctan(sin(b*x+a)^(1/2)))/b

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (28) = 56\).

Time = 0.33 (sec) , antiderivative size = 95, normalized size of antiderivative = 2.97 \[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=\frac {2 \, \arctan \left (\frac {\sin \left (b x + a\right ) - 1}{2 \, \sqrt {\sin \left (b x + a\right )}}\right ) + \log \left (\frac {\cos \left (b x + a\right )^{2} + \frac {4 \, {\left (\cos \left (b x + a\right )^{2} - \sin \left (b x + a\right ) - 1\right )}}{\sqrt {\sin \left (b x + a\right )}} - 6 \, \sin \left (b x + a\right ) - 2}{\cos \left (b x + a\right )^{2} + 2 \, \sin \left (b x + a\right ) - 2}\right )}{4 \, b} \]

[In]

integrate(csc(b*x+a)^(1/2)*sec(b*x+a),x, algorithm="fricas")

[Out]

1/4*(2*arctan(1/2*(sin(b*x + a) - 1)/sqrt(sin(b*x + a))) + log((cos(b*x + a)^2 + 4*(cos(b*x + a)^2 - sin(b*x +
 a) - 1)/sqrt(sin(b*x + a)) - 6*sin(b*x + a) - 2)/(cos(b*x + a)^2 + 2*sin(b*x + a) - 2)))/b

Sympy [F]

\[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=\int \sqrt {\csc {\left (a + b x \right )}} \sec {\left (a + b x \right )}\, dx \]

[In]

integrate(csc(b*x+a)**(1/2)*sec(b*x+a),x)

[Out]

Integral(sqrt(csc(a + b*x))*sec(a + b*x), x)

Maxima [A] (verification not implemented)

none

Time = 0.45 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.28 \[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=-\frac {2 \, \arctan \left (\frac {1}{\sqrt {\sin \left (b x + a\right )}}\right ) - \log \left (\frac {1}{\sqrt {\sin \left (b x + a\right )}} + 1\right ) + \log \left (\frac {1}{\sqrt {\sin \left (b x + a\right )}} - 1\right )}{2 \, b} \]

[In]

integrate(csc(b*x+a)^(1/2)*sec(b*x+a),x, algorithm="maxima")

[Out]

-1/2*(2*arctan(1/sqrt(sin(b*x + a))) - log(1/sqrt(sin(b*x + a)) + 1) + log(1/sqrt(sin(b*x + a)) - 1))/b

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.31 \[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=\frac {2 \, \arctan \left (\sqrt {\sin \left (b x + a\right )}\right ) + \log \left (\sqrt {\sin \left (b x + a\right )} + 1\right ) - \log \left ({\left | \sqrt {\sin \left (b x + a\right )} - 1 \right |}\right )}{2 \, b} \]

[In]

integrate(csc(b*x+a)^(1/2)*sec(b*x+a),x, algorithm="giac")

[Out]

1/2*(2*arctan(sqrt(sin(b*x + a))) + log(sqrt(sin(b*x + a)) + 1) - log(abs(sqrt(sin(b*x + a)) - 1)))/b

Mupad [F(-1)]

Timed out. \[ \int \sqrt {\csc (a+b x)} \sec (a+b x) \, dx=\int \frac {\sqrt {\frac {1}{\sin \left (a+b\,x\right )}}}{\cos \left (a+b\,x\right )} \,d x \]

[In]

int((1/sin(a + b*x))^(1/2)/cos(a + b*x),x)

[Out]

int((1/sin(a + b*x))^(1/2)/cos(a + b*x), x)